package yto.freemarker.springcloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import yto.freemarker.springcloud.entity.User;
import yto.freemarker.springcloud.feign.UserFeignClient;

/**
 * @author dongxing
 * @create 2017-12-24 17:00
 **/
@RestController
public class UserController {
    @Autowired
    private UserFeignClient userFeignClient;

    @GetMapping("/simple/{id}")
    public User findById(@PathVariable Long id) {
        return userFeignClient.findById(id);
    }


}
